﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using XsqTech.SmartOA.Domain.Table;
using XsqTech.SmartOA.Dtos.XSPDto.FormDto;
using XsqTech.SmartOA.Service.DTO;

namespace XsqTech.SmartOA.IService
{
    public interface ITimingService
    {
        /// <summary>
        ///  获取全部Job任务信息
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        ResponseModel GetTimingList(string? name, int index, int size);

        /// <summary>
        /// 删除Job任务信息(单删)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResponseModel DeleteTiming(string id);

        /// <summary>
        /// 删除Job任务信息（批删）
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ResponseModel AllFormDelete(List<TimingDto> dto);

        /// <summary>
        /// 添加Job任务信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ResponseModel AddTiming(TimingDto dto);
        /// <summary>
        /// 反填Job任务信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResponseModel TimingQueryId(string id);
        /// <summary>
        /// 修改Job任务信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ResponseModel UpdateTiming(TimingDto dto);
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool UpdateState(TimingDto dto);

        /// <summary>
        /// 启动Job任务
        /// </summary>
        /// <param name="data">Job信息</param>
        /// <returns></returns>
        Task<ResponseModel> StartScheduleJob(TimingDto data);

        /// <summary>
        /// 反射拿取全部继承了IJob接口的命名路由
        /// </summary>
        /// <returns></returns>
        List<dynamic> After();
        /// <summary>
        ///暂停Job任务
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResponseModel> PauseScheduleJob(TimingDto data);
    }
}
